﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkflowExecute.aspx.cs" Inherits="SaaS.WorkflowExecute" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Execute Workflow</title>
</head>
<body background="img/bg.jpg">
    <form id="form1" runat="server">
    <div>
    
        <asp:HyperLink ID="HyperLink1" runat="server" 
            NavigateUrl="~/WorkflowManager.aspx">&lt;- Back</asp:HyperLink>
        <br />
        <br />
        <asp:Label ID="Label3" runat="server" Text="Workflow ID:"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="lblWorkflowID" runat="server"></asp:Label>
        <br />
        <asp:Label ID="Label4" runat="server" Text="Workflow Name:"></asp:Label>
&nbsp;
        <asp:Label ID="lblWorkflowName" runat="server"></asp:Label>
        <br />
        <br />
        <asp:Label ID="Label1" runat="server" Text="Input Value:"></asp:Label>
        <asp:TextBox ID="txtInput" runat="server" style="margin-left: 16px"></asp:TextBox>
        <br />
        <asp:Button ID="Button1" runat="server" style="margin-left: 113px" 
            Text="Execute" onclick="Button1_Click" />
        <br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" 
            GridLines="None">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="Order_Number" HeaderText="Order" 
                    SortExpression="Order_Number" />
                <asp:BoundField DataField="Service_ID" HeaderText="ID" 
                    SortExpression="Service_ID" />
                <asp:BoundField DataField="Service_Name" HeaderText="Name" 
                    SortExpression="Service_Name" />
                <asp:BoundField DataField="Service_Function_Name" HeaderText="Function Name" 
                    SortExpression="Service_Function_Name" />
                <asp:BoundField DataField="Service_Path" HeaderText="Path" 
                    SortExpression="Service_Path" />
                <asp:BoundField DataField="Service_Description" HeaderText="Description" 
                    SortExpression="Service_Description" />
                <asp:BoundField HeaderText="Output" />
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MiniSaaSConnectionString %>" 
            SelectCommand="SELECT TENANT_WORKFLOW_SERVICE.Order_Number, SERVICE.Service_ID, SERVICE.Service_Name, SERVICE.Service_Path, SERVICE.Service_Function_Name, SERVICE.Service_Description FROM SERVICE INNER JOIN TENANT_WORKFLOW_SERVICE ON SERVICE.Service_ID = TENANT_WORKFLOW_SERVICE.Service_ID WHERE (TENANT_WORKFLOW_SERVICE.Tenant_Workflow_ID = @tenantWorkflowID)">
            <SelectParameters>
                <asp:SessionParameter Name="tenantWorkflowID" SessionField="WorkflowID" />
            </SelectParameters>
            <FilterParameters>
                <asp:SessionParameter Name="tenantWorkflowID" SessionField="WorkflowID" />
                <asp:SessionParameter Name="loginID" SessionField="LoginID" />
            </FilterParameters>
        </asp:SqlDataSource>
        <br />
        <asp:Label ID="Label2" runat="server" Text="Output Value:"></asp:Label>
        <br />
        <asp:TextBox ID="txtOutput" runat="server" Height="148px" ReadOnly="True" 
            TextMode="MultiLine" Width="245px"></asp:TextBox>
        <br />
    </div>
    </form>
</body>
</html>
